<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>后台管理 - 天气预报</title>
  <link rel="stylesheet" href="style.css">
  <style>
    .admin-box { max-width: 400px; margin: 60px auto; background: #fff; border-radius: 10px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); padding: 32px 24px; }
    .admin-box h2 { text-align: center; margin-bottom: 24px; }
    .admin-box input, .admin-box button { width: 100%; margin-bottom: 16px; padding: 10px; border-radius: 6px; border: 1px solid #b2b2b2; font-size: 1rem; }
    .admin-box button { background: #2b5876; color: #fff; border: none; cursor: pointer; }
    .admin-box button:hover { background: #66a6ff; }
    .admin-box .msg { color: #d32f2f; text-align: center; margin-bottom: 12px; }
  </style>
</head>
<body>
  <div class="admin-box" id="loginBox">
    <h2>后台登录</h2>
    <div class="msg" id="loginMsg"></div>
    <input type="text" id="adminUser" placeholder="用户名">
    <input type="password" id="adminPass" placeholder="密码">
    <button id="loginBtn">登录</button>
  </div>
  <div class="admin-box" id="settingBox" style="display:none;">
    <h2>网站设置</h2>
    <div class="msg" id="settingMsg"></div>
    <input type="text" id="siteTitle" placeholder="网站标题">
    <select id="apiPlatform" style="width:100%;margin-bottom:16px;padding:10px;border-radius:6px;border:1px solid #b2b2b2;font-size:1rem;">
      <option value="amap">高德天气</option>
      <option value="qweather">和风天气</option>
      <option value="aliyun">阿里云天气</option>
    </select>
    <input type="text" id="amapKey" class="platform-key" data-platform="amap" placeholder="高德API Key">
    <input type="text" id="qweatherKey" class="platform-key" data-platform="qweather" placeholder="和风天气API Key">
    <input type="text" id="qweatherHost" class="platform-key" data-platform="qweather" placeholder="和风天气专属Host，如xxxxxx.qweatherapi.com">
    <input type="text" id="qweatherJwt" class="platform-key" data-platform="qweather" placeholder="和风天气JWT密钥（Bearer Token）">
    <input type="text" id="aliyunAppCode" class="platform-key" data-platform="aliyun" placeholder="阿里云天气AppCode">
    <button id="saveBtn">保存设置</button>
    <button id="logoutBtn" style="background:#b2b2b2;color:#333;">退出登录</button>
  </div>
  <script src="admin.js"></script>
</body>
</html> 